package com.zhs.elasticsearch.util;

import java.util.Arrays;
import java.util.List;
import java.util.concurrent.ThreadLocalRandom;

/**
 *
 * @Author zhenghuisheng
 * @Date：2025/6/23 16:04
 */
public class CityUtil {

    private static final List<String[]> PROVINCE_AND_CITY_LIST = Arrays.asList(
            new String[]{"北京市", "北京市"},
            new String[]{"天津市", "天津市"},
            new String[]{"上海市", "上海市"},
            new String[]{"重庆市", "重庆市"},
            new String[]{"河北省", "石家庄市"},
            new String[]{"山西省", "太原市"},
            new String[]{"辽宁省", "沈阳市"},
            new String[]{"吉林省", "长春市"},
            new String[]{"黑龙江省", "哈尔滨市"},
            new String[]{"江苏省", "南京市"},
            new String[]{"浙江省", "杭州市"},
            new String[]{"安徽省", "合肥市"},
            new String[]{"福建省", "福州市"},
            new String[]{"江西省", "南昌市"},
            new String[]{"山东省", "济南市"},
            new String[]{"河南省", "郑州市"},
            new String[]{"湖北省", "武汉市"},
            new String[]{"湖南省", "长沙市"},
            new String[]{"广东省", "广州市"},
            new String[]{"海南省", "海口市"},
            new String[]{"四川省", "成都市"},
            new String[]{"贵州省", "贵阳市"},
            new String[]{"云南省", "昆明市"},
            new String[]{"陕西省", "西安市"},
            new String[]{"甘肃省", "兰州市"},
            new String[]{"青海省", "西宁市"},
            new String[]{"台湾省", "台北市"},
            new String[]{"内蒙古自治区", "呼和浩特市"},
            new String[]{"广西壮族自治区", "南宁市"},
            new String[]{"西藏自治区", "拉萨市"},
            new String[]{"宁夏回族自治区", "银川市"},
            new String[]{"新疆维吾尔自治区", "乌鲁木齐市"},
            new String[]{"香港特别行政区", "香港"},
            new String[]{"澳门特别行政区", "澳门"}
    );

    public static String[] getRandomCity() {
        return PROVINCE_AND_CITY_LIST.get(ThreadLocalRandom.current().nextInt(PROVINCE_AND_CITY_LIST.size()));
    }
}
